<template>
	<view class="page" v-if="info">
		
		<view class="title">
			<image src="/static/restaurant/user/bill.png" mode="widthFix"></image>
			<text>{{info.title}}</text>
			<text>{{info.mark}}{{info.money}}</text>
		</view>
		
		<view class="list">
			<view class="text">
				<text>当前状态</text>
				<text>{{info.order_status}}</text>
			</view>
			<!-- <view class="text">
				<text>支付方式</text>
				<text>余额</text>
			</view> -->
			<view class="text">
				<text>支付时间</text>
				<text>{{$wanlshop.timeToDate(info.createtime)}}</text>
			</view>
			<view class="text" v-if="info.trade_no">
				<text>交易单号</text>
				<text @tap="$wanlshop.copy(info.trade_no)">{{info.trade_no}}</text>
			</view>
			<view class="text">
				<text>余额</text>
				<text>{{info.after}}</text>
			</view>
			<view class="text">
				<text>备注</text>
				<text>{{info.remark}}</text>
			</view>
		</view>
		
	</view>
</template>

<script>
	import {mapState} from 'vuex';
	export default {
		data() {
			return {
				info:null
			}
		},
		computed: {
			...mapState(['user','common'])
		},
		onLoad(option) {
			this.loadData(option.id)
		},
		methods: {
			async loadData(log_id) {
				let res = await this.$api.getMoneyDetail({
					log_id:log_id
				});
				if(res.code == 1) {
					this.info = res.data;
				}
			},
		}
	}
</script>
<style lang="less">
	page {
		background-color: #fff;
	}
</style>
<style lang="less" scoped>
.title {
	width: 670rpx;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 66rpx;
	padding-bottom: 140rpx;
	border-bottom: 1rpx solid #EDEDED;
	margin-bottom: 44rpx;
	image {
		width: 110rpx;
		height: 110rpx;
		margin-bottom: 22rpx;
	}
	text {
		&:nth-child(2) {
			color: #333333;
			font-size: 32rpx;
			margin-bottom: 12rpx;
		}
		&:nth-child(3) {
			color: #333333;
			font-size: 50rpx;
			font-weight: 500;
		}
	}
}

.list {
	padding: 0 42rpx;
	.text {
		display: flex;
		justify-content: flex-start;
		// align-items: center;
		// height: 50rpx;
		padding: 15rpx 0;
		text {
			display: inline-block;
			&:nth-child(1) {
				color: #999999;
				font-size: 28rpx;
				width: 120rpx;
				margin-right: 40rpx;
			}
			&:nth-child(2) {
				color: #333333;
				font-size: 28rpx;
				width: calc(100% - 160rpx);
			}
		}
	}
}
</style>
